package org.xtremeobjects.workbech.rcp;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.part.EditorActionBarContributor;


public class ObjectEditorActionBarContributor extends
		EditorActionBarContributor {

	private IContributionItem objectEditorAction;

	public ObjectEditorActionBarContributor() {
//		objectEditorAction = new OpenObjectEditorAction();
	}

	@Override
	public void contributeToCoolBar(ICoolBarManager coolBarManager) {
		// TODO Auto-generated method stub
		super.contributeToCoolBar(coolBarManager);
	}

	@Override
	public void contributeToMenu(IMenuManager menuManager) {
		IMenuManager editMenu= menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
		if (editMenu != null) {
			editMenu.prependToGroup(IWorkbenchActionConstants.FIND_EXT, objectEditorAction);

/*			addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_OPEN));
			addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_INFORMATION));
			addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_ASSIST));
			addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_GENERATE));
			addOrInsert(editMenu, new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

			editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, fHippieCompletion);
			/**/
		}

/*		IMenuManager navigateMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
		if (navigateMenu != null) {
			navigateMenu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, fGotoLine);
		}
		/**/
	}

	@Override
	public void contributeToStatusLine(IStatusLineManager statusLineManager) {
		// TODO Auto-generated method stub
		super.contributeToStatusLine(statusLineManager);
	}

	@Override
	public void contributeToToolBar(IToolBarManager toolBarManager) {
		// TODO Auto-generated method stub
		super.contributeToToolBar(toolBarManager);
	}

	@Override
	public void setActiveEditor(IEditorPart targetEditor) {
		// TODO Auto-generated method stub
		super.setActiveEditor(targetEditor);
	}

	
	
}
